package org.weasel.unittests;

import junit.framework.TestCase;

import org.weasel.business.Iteration;
import org.weasel.business.Release;
import org.weasel.business.Unscheduled;

public class ReleaseTest extends TestCase {

	Release release;
	protected void setUp() throws Exception {
		super.setUp();
		release = new Release("id", "name", null, new Unscheduled("uid", null), "");
	}

	protected void tearDown() throws Exception {
		super.tearDown();
		release = null;
	}

	public void testAddIteration() {
		Iteration i = new Iteration("id", "name", null, "");
		release.addIteration(i);
		Iteration iCheck = release.getIteration(i.getId());
		assertEquals(i.getId(), iCheck.getId());
	}

	public void testRemoveIteration() {
		Iteration i = new Iteration("id", "name", null, "");
		release.addIteration(i);
		release.removeIteration(i.getId());
		assertNull(release.getIteration(i.getId()));
	}

}
